package com.java8.ch06;

/**
 * A program that uses the Box class Call this file BoxDemo.java
 * 
 * @author Administrator
 *
 */
class Box {

	double width;
	double height;
	double depth;
}

// This class declares an object of type Box.
public class BoxDemo {

	public static void main(String[] args) {
		Box mybox = new Box();
		double vol;
		// assign values to mybox's instance variable
		mybox.width = 10;
		mybox.height = 20;
		mybox.depth = 15;

		// compute volume of box
		vol = mybox.width * mybox.height * mybox.depth;
		System.out.println("Volumn is " + vol);
	}
}
